<?php 

/*
	$Id: video.php 2012-08-23 lrb $
*/

if(!defined('IN_UCHOME')) {
	exit('Access Denied');
}

$id = empty($_GET['id'])?'0':$_GET['id'];

$perpage = 5;
$mpurl = 'video.php?ac='.$ac.'&id='.$id.'';

$page = empty($_GET['page'])?1:intval($_GET['page']);
if($page<1) $page = 1;
$start = ($page-1)*$perpage;
//检查开始数
ckstart($start, $perpage);

$wheresql="ischeck=1 and videoid=".$id."";

$clist=array();

$count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM ".tname('video_comment')." WHERE $wheresql"), 0);

if($count) {

	$query=$_SGLOBAL['db']->query("select * from ".tname('video_comment')." where $wheresql order by dateline desc limit $start,$perpage");
	
	while($row=$_SGLOBAL['db']->fetch_array($query)){
		$clist[]=$row;
	}
	$multi = multi($count, $perpage, $page, $mpurl,'vc_list');
}




function getkdtime($second){
	$str='';
	$m=floor($second/(60));
	if($m){
		$str.=$m.'分';
		$second-=$m*60;
	}
	
	$str.=$second.'秒';
	
	return $str;
}

?>